package com.kinyx.framework.business;

import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;

import lombok.AllArgsConstructor;

@RunWith(Parameterized.class)
@AllArgsConstructor
public class KHexUtils_Tester_byte2charL {

	char expected;
	byte b;

	@Parameters
	public static Object[][] params() {
		return new Object[][]{
				{
						'0', (byte) 0// 00
				}, {
						'9', (byte) 9// 09
				}, {
						'a', (byte) 10// 0A
				}, {
						'f', (byte) 15// 0F
				}, {
						'f', (byte) 127// 7F
				}, {
						'0', (byte) -128// 80
				}, {
						'f', (byte) -1// FF
				},
		};
	}

	@Test
	public void test() {
		Assert.assertEquals(this.expected, KHexUtils.byte2charL(this.b));
	}

}
